﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="EmpAwardEdit.aspx.cs" Inherits="Web.EmpAwardEdit" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <title>奖惩情况</title>
    <base target="_self" />
    <meta content="ie=7" http-equiv="x-ua-compatible"/>
    <META HTTP-EQUIV="Pragma" CONTENT="no-cache"/>
    <META HTTP-EQUIV="Cache-Control" CONTENT="no-cache"/>
    <META HTTP-EQUIV="Expires" CONTENT="0"/>
    <link href="Styles/Style01.css" rel="stylesheet" type="text/css" />
    <script src="Scripts/jquery-1.7.min.js" type="text/javascript"></script>
    <script src="Scripts/easy_validator.pack.js" type="text/javascript"></script>
    <script src="Content/scripts/My97DatePicker/WdatePicker.js" type="text/javascript"></script>
    <script type="text/javascript">
        //取get参数
        function getArg() {
            var url = unescape(window.location.href);
            var allArgs = url.split("?")[1];
            if (allArgs != null) {
                var args = allArgs.split("&");
                for (var i = 0; i < args.length; i++) {
                    var arg = args[i].split("=");
                    eval('this.' + arg[0] + '="' + arg[1] + '";');
                }
            }
        }
        var urlArg = new getArg();
        var empId = urlArg.empId;
        $(function () {
            $("[reg]").parents("td").prev().append("<font color='#ff0000'>*</font>");
            $("#btnSave").click(function () {
                var isSubmit = true;
                $("form").find("[reg],[url]:not([reg])").each(function () {
                    if (!validate($(this), this.tagName)) {
                        isSubmit = false;
                    }
                });
                if (!isSubmit) {
                    alert("请确认'红字或红框'处的输入正确!");
                    return false;
                }
                return true;
            });
        });
        function back() { }
    </script>
    <link href="Styles/validate.css" rel="stylesheet" type="text/css" />
</head>
<body>
<form id="Form1" runat="server"><input type="hidden" runat="server" id="EmpId" />
<table class="s1">
    <tr>
        <td width="20%">日期</td>
        <td width="30%"><input id="txtDate" runat="server" class="Wdate" onclick="WdatePicker();" title="格式:yyyy-MM-dd!" reg="."/></td>
        </tr>
        <tr>
        <td width="20%">奖惩类型</td>
        <td><input id="txtType" runat="server" /></td>
        </tr>
        <tr>
        <td>奖惩项目</td>
        <td><input id="txtItem" runat="server"/></td>
        </tr>
        <tr>
        <td>奖惩内容</td>
        <td><input id="txtContent" runat="server" reg="." title="不能为空"/></td>
    </tr>
</table>
<div style="text-align:right;margin-right:24px;margin-top:6px;">
    <asp:button runat="server" text="保存" id="btnSave" onclick="btnSave_Click"/>
    <input type="button" value="返回" onclick="back();" />
</div>
</form>
</body>
</html>
